/****************************************************************
irrEventManager
Copyright (C) 2007-2008 Keith Holbrook
This file is part of "irrEventManager".
For conditions of distribution and use, see copyright notice in irrEventManagerr.h

*****************************************************************/

#ifndef __EVENTMANAGER_CFG_H__
#define __EVENTMANAGER_CFG_H__



/// _IRREVENTMANAGER_CALLCONV and _IRREVENTMANAGER_API  are only used in "IrrEventManager.h" and "CEventManager.cpp" for creating the manager.
///You should only change these if recompiling the managner.

#ifndef _IRREVENTMANAGER_CALLCONV
#define _IRREVENTMANAGER_CALLCONV __stdcall
#endif

//!these are the flags used for dll or static lib, as used in irrlicht.
/**You need to define EVENTMANAGER_STATIC_LIB_ OR
 EVENTMANAGER_BUILD_DLL in your compilers build options.
In CodeBlocks this would be in "build options>>compiler settings>>defines"*/

#ifndef _IRREVENTMANAGER_STATIC_LIB_

//#ifdef _IRREVENTMANAGER_EXPORTS
//    #define _IRREVENTMANAGER_API __declspec(dllexport)
//#else
//    #define _IRREVENTMANAGER_API __declspec(dllimport)
//#endif

//#else
#define _IRREVENTMANAGER_API
#endif



//! (OPTIONAL!)
/**To handle right and left  shift/control key events I've done the following:

 * in "IEventReceiver.h"  added to SKeyInput:
struct SKeyInput
	{
		...
    #ifdef USE_CUSTOM_SEVENT

		//! True if Lshift was also pressed
		bool LShift;

		//! True if Lctrl was also pressed
		bool LControl;

		//! True if Rshift was also pressed
		bool RShift;

		//! True if Rctrl was also pressed
		bool RControl;

     #endif
      }


in irrDeviceWin32.cpp , in the WndProc callback, added the following to WM_KEYUP:  :
LRESULT CALLBACK WndProc(.....)
{
....
case WM_KEYUP:
....

   after this line:
    event.KeyInput.Char = (KeyAsc & 0x00ff); //KeyAsc >= 0 ? KeyAsc : 0;

added:
 #ifdef USE_CUSTOM_SEVENT
    event.KeyInput.LShift = ((allKeys[VK_LSHIFT] & 0x80)!=0);
    event.KeyInput.LControl = ((allKeys[VK_LCONTROL] & 0x80)!=0);
    event.KeyInput.RShift = ((allKeys[VK_RSHIFT] & 0x80)!=0);
    event.KeyInput.RControl = ((allKeys[VK_RCONTROL] & 0x80)!=0);
#endif
....


To irrlicht build options>compiler settings>defines, added
USE_CUSTOM_SEVENT

then recompiled irrlicht.


Then either uncomment USE_CUSTOM_SEVENT below or add it to the build options for irrEventManager
and recompile irrEventManager .
 L/R Shift/Control should work now.*/

//#define USE_CUSTOM_SEVENT


#endif
